package observerNotification;

import java.net.InetAddress;


/**
 * Message: a remote user changes state
 * 
 * <p>
 * <ul>
 * <li>Project: 	ChatSystemG3</li>
 * </ul>
 * </p>
 * 
 * @author COMBES Nicolas - LECHANTRE Arnaud
 * @see ConversationObserverNotification
 * @see ObserverNotification
 */
public class RemoteUserObserverNotification extends ConversationObserverNotification {

	private boolean connected;
	private boolean broadcast;

	public RemoteUserObserverNotification(String username, InetAddress ipAddress, boolean connected, boolean broadcast) {
		super(-1, ipAddress, username);
		this.connected= connected;
		this.broadcast=broadcast;
	}

	public RemoteUserObserverNotification(String username,
			InetAddress remoteAddress, boolean connected, boolean broadcast, int convId) {
		super(convId, remoteAddress, username);
		this.connected= connected;
		this.broadcast=broadcast;
	}

	public boolean isBroadcast() {
		return broadcast;
	}

	public void setBroadcast(boolean broadcast) {
		this.broadcast = broadcast;
	}

	public boolean isConnected() {
		return connected;
	}

	public void setConnected(boolean connected) {
		this.connected = connected;
	}

}
